import Foundation
@objcMembers open
class FYOrderListResponse: FYBaseModel {
    public var data: FYOrderListResponseData?
}
@objcMembers open
class FYOrderListResponseData: FYBaseModel {
    public var orderList: [FYOrderListOrderItem] = []
}
@objcMembers open
class FYOrderListOrderItem: FYBaseModel {
    public var applyDate: String = ""
    public var dueDate: String = ""
    public var loanAmount: String = ""
    public var loanDate: String = ""
    public var orderId: String = ""
    public var orderStatus: FYOrderStatus = .unknown
    public var productId: String = ""
    public var productName: String = ""
    public var repayDate: String = ""
    public var firstTitle: String {
        switch self.orderStatus {
        case .repayment, .payoff, .due:
            return "Payment date"
        default: return "Date of application"
        }
    }
    public var firstDate: String {
        switch self.orderStatus {
        case .repayment, .payoff, .due:
            return self.loanDate.fixEmpty
        default: return self.applyDate.fixEmpty
        }
    }
    public var secondTitle: String {
        switch self.orderStatus {
        case .payoff:
            return "Repayment date"
        default: return "Due date"
        }
    }
    public var secondDate: String {
        switch self.orderStatus {
        case .payoff:
            return self.repayDate.fixEmpty
        default: return self.dueDate.fixEmpty
        }
    }
}
